package Problem;

public class Problem1 {
    public static void main(String[] args) {
        Sub sub = new Sub(1,2,3);
        sub.calculate();
    }
}
class Sub extends Base{
    private double z;
    public Sub(double x, double y, double z) {
        super(x, y);
        this.z = z;
    }

    public double getZ() {
        return z;
    }

    public void setZ(double z) {
        this.z = z;
    }
    public void calculate (){
        System.out.println(getX() * getY() * getZ());
    }
}
class Base {
    private double x;
    private double y;
    public Base(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }
}
